<html>
<title>Release Process</title>
<body>
<h2>Release Process</h2>

<h3>First time set up</h3>
<ul>
  <li>Make sure you have at least a Committer role</li>
  <li>Make sure you have permission to post to the <a
    href="http://google-api-java-client.blogspot.com/">Announcement Blog</a>.</li>
  <li>Check out the <code>google-api-java-client</code> project using <a
    href="http://google-api-java-client.googlecode.com/hg/instructions.html?r=1.3.3-alpha">these
  instructions</a>.</li>
  <li>Check out the <code>javadoc</code> project using <a
    href="http://javadoc.google-api-java-client.googlecode.com/hg/instructions.html">these
  instructions</a> into the same parent directory as the <code>google-api-java-client</code>
  project.</li>
  <li>Download <a href="http://sourceforge.net/projects/javadiff/">JDiff</a>.</li>
  <li>Set up for pushing to central Maven repository
  <ul>
    <li>Sign up for a Sonatype JIRA account at <a
      href="https://issues.sonatype.org/">https://issues.sonatype.org</a>. Click
    <i>Sign Up</i> in the Login box, fill out the simple form, and click <i>Sign
    Up</i>.</li>
    <li>Install a GPG client from <a href="http://www.gnupg.org/">http://www.gnupg.org/</a>,
    and then create a GPG key using <a
      href="http://www.sonatype.com/people/2010/01/how-to-generate-pgp-signatures-with-maven/">these
    instructions</a>, making sure to specify a passphrase to be used every time you
    release.  Make sure to run the instructions under "Distribute Your Public Key".</li>
    <li>Add these lines to your <code>~/.hgrc</code>: <pre><code>
[ui]
username = Your Name <yourname@domain.com>

[auth]
google-api-java-client.prefix = https://google-api-java-client.googlecode.com/hg/
google-api-java-client.username = <i>[username from <a
href="https://code.google.com/hosting/settings">https://code.google.com/hosting/settings</a>]</i>
google-api-java-client.password = <i>[password from <a
href="https://code.google.com/hosting/settings">https://code.google.com/hosting/settings</a>]</i></code></pre></li>
    <li>Add these lines to your <code>~/.m2/settings.xml</code> (create
    this file if it does not already exist): <pre><code>&lt;settings&gt;
  &lt;servers&gt;
    &lt;server&gt;
      &lt;id&gt;google-snapshots&lt;/id&gt;
      &lt;username&gt;<i>[username for <a
      href="https://issues.sonatype.org/">https://issues.sonatype.org</a>]</i>&lt;/username&gt;
      &lt;password&gt;<i>[password for <a
      href="https://issues.sonatype.org/">https://issues.sonatype.org</a>]</i>&lt;/password&gt;
    &lt;/server&gt;
    &lt;server&gt;
      &lt;id&gt;google-releases&lt;/id&gt;
      &lt;username&gt;<i>[username for <a
      href="https://issues.sonatype.org/">https://issues.sonatype.org</a>]</i>&lt;/username&gt;
      &lt;password&gt;<i>[password for <a
      href="https://issues.sonatype.org/">https://issues.sonatype.org</a>]</i>&lt;/password&gt;
    &lt;/server&gt;
    &lt;server&gt;
      &lt;id&gt;sonatype-nexus-snapshots&lt;/id&gt;
      &lt;username&gt;<i>[username for <a
      href="https://issues.sonatype.org/">https://issues.sonatype.org</a>]</i>&lt;/username&gt;
      &lt;password&gt;<i>[password for <a
      href="https://issues.sonatype.org/">https://issues.sonatype.org</a>]</i>&lt;/password&gt;
    &lt;/server&gt;
    &lt;server&gt;
      &lt;id&gt;sonatype-nexus-staging&lt;/id&gt;
      &lt;username&gt;<i>[username for <a
      href="https://issues.sonatype.org/">https://issues.sonatype.org</a>]</i>&lt;/username&gt;
      &lt;password&gt;<i>[password for <a
      href="https://issues.sonatype.org/">https://issues.sonatype.org</a>]</i>&lt;/password&gt;
    &lt;/server&gt;
  &lt;/servers&gt;
&lt;/settings&gt;</code></pre></li>
  </ul>
  </li>
</ul>

<h3>Release version 1.3.3-alpha (minor update)</h3>
<ul>
  <li>Prepare the project
  <ul>
    <li><pre>
hg status
hg out
</pre> to make sure you have no changes that have not yet been committed or pushed to
    the Mercurial server</li>
  </ul>
  </li>
  <li>Push to central Maven repository (based on instructions from <a
    href="https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide">Sonatype
  OSS Maven Repository Usage Guide</a>):
  <ul>
    <li>Prepare:<pre>
cd <i>rootDir</i>/google-api-java-client
mvn clean deploy
mvn release:clean
</pre></li>
    <li><code>mvn release:prepare -DautoVersionSubmodules=true</code>
    <ul>
      <li>Accept default for 'What is the release version for "Google API
      Client - Parent"?'</li>
      <li>Type <code>1.3.3-alpha</code> for 'What is SCM release tag or
      label for "Google API Client - Parent"?'</li>
      <li>Accept default for 'What is the new development version for
      "Google API Client - Parent"?'</li>
    </ul>
    </li>
    <li><code>mvn release:perform -Darguments=-Dgpg.passphrase=<i>[YOUR
    GPG PASSPHRASE]</i></code></li>
    <li>Release on oss.sonatype.org
    <ul>
      <li>Log in to <a href="https://oss.sonatype.org">https://oss.sonatype.org</a></li>
      <li>Click on "Staging Repositories" and look for the "com.google" Repository with your username</li>
      <li>check box next to uploaded release</li>
      <li>click Close button; type <code>1.3.3-alpha</code> and click Close</li>
      <li>check box next to uploaded release</li>
      <li>click Release button; type <code>1.3.3-alpha</code> and click
      Release</li>
    </ul>
    </li>
    <li>Central Maven repository is synced hourly. Once uploaded onto repo2.maven.org, it will be found at: <a
      href="http://repo2.maven.org/maven2/com/google/api/client/google-api-client/1.3.3-alpha/">repo2.maven.org</a></li>
  </ul>
  </li>
  <li>Start development of next bug fix version
  <ul>
    <li><code>hg update</code></li>
    <li>For the following files, replace <code>1.3.3-alpha</code> with <code>1.3.4-alpha</code>:
    <ul>
      <li><code>jdiff.xml</code></li>
      <li><code>release.html</code>
      <ul>
        <li>before-hand replace 1.3.4 with next minor version, and 1.3.3
        with 1.3.4</li>
      </ul>
      </li>
      <li><code>google-api-client/src/main/java/com/google/api/client/util/Strings.java</code></li>
    </ul>
    </li>
    <li><pre>
hg commit -m "start 1.3.4-alpha"
hg push
</pre></li>
  </ul>
  </li>
  <li>Prepare the released library zip file and javadoc
  <ul>
    <li>JDiff is a tool for showing the difference between the JavaDoc of one version of the library vs. the JavaDoc of an old version of the library.  Hence, we will check out the last minor version of the library into a temporary directory and compare against the JavaDoc of the just released version of the library, and then hg commit that diff into the javadoc Hg repository.</li>
    <li>change these constants from jdiff.xml for your
    environment: JDIFF_HOME, MAVEN_REPOSITORY_HOME, PROJECT_ROOT_DIR,
    JAVADOC_PROJECT_ROOT_DIR</li>
    <li><pre>
cd /tmp
rm -rf google-api-java-client
mkdir google-api-java-client
cd google-api-java-client
hg clone -r 1.2.3-alpha https://google-api-java-client.googlecode.com/hg/ 1.2.3-alpha
hg clone -r 1.3.3-alpha https://google-api-java-client.googlecode.com/hg/ 1.3.3-alpha
cd 1.3.3-alpha
mvn javadoc:jar install site
ant -f jdiff.xml
cp -R target/site/apidocs/ <i>rootDir</i>/javadoc/1.3.3-alpha
cd <i>rootDir</i>/javadoc
hg add
hg commit -m "1.3.3-alpha"
hg push
cd <i>rootDir</i>/google-api-java-client
</pre></li>
  </ul>
  </li>
  <li><b>WAIT!</b> Don't do the following instructions until after the library has been uploaded to repo2.maven.org at: <a
      href="http://repo2.maven.org/maven2/com/google/api/client/google-api-client/1.3.3-alpha/">repo2.maven.org</a></li>
  <li>Update to new version on <a
    href="http://code.google.com/p/google-api-java-client">http://code.google.com/p/google-api-java-client</a>
  <ul>
    <li>Upload to <a
      href="http://code.google.com/p/google-api-java-client/downloads/entry">http://code.google.com/p/google-api-java-client/downloads/entry</a>
    <ul>
      <li>Summary: Google API Client Library for Java, version 1.3.3-alpha</li>
      <li>File: <code>/tmp/google-api-java-client/1.3.3-alpha/google-api-client-assembly/target/google-api-client-1.3.3-alpha-java.zip</code></li>
      <li>Labels: <code>Type-Archive</code>, <code>OpSys-All</code>, and <code>Featured</code></li>
      <li>click Submit file</li>
    </ul>
    </li>
    <li>If it is a bug fix release, deprecate the library from any previous
    versions by removing any <code>Featured</code> label and adding the <code>Deprecated</code>
    label.</li>
    <li>Update the following pages changing any reference from the previous
    version to the new version <code>1.3.3-alpha</code>:
    <ul>
      <li><a href="http://code.google.com/p/google-api-java-client/admin">admin</a></li>
      <li><a
        href="http://code.google.com/p/google-api-java-client/w/edit/Setup">wiki/Setup</a></li>
      <li><a
        href="http://code.google.com/p/google-api-java-client/w/edit/SampleProgram">wiki/SampleProgram</a></li>
    </ul>
    </li>
  </ul>
  </li>
  <li><a
    href="http://www.blogger.com/post-create.g?blogID=4531100327392916335">New
  Post</a> on the <a href="http://google-api-java-client.blogspot.com/">announcement
  blog</a> about the new version, including links to:
  <ul>
    <li><a
      href="http://code.google.com/p/google-api-java-client/issues/list?can=1&q=milestone=Version1.3.3%20type=Defect&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary">Bugs
    Fixed</a></li>
    <li><a
      href="http://code.google.com/p/google-api-java-client/issues/list?can=1&q=milestone=Version1.3.3%20type=Enhancement&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary">Features
    Added</a></li>
  </ul>
  </li>
</ul>
</body>
</html>
